package com.yehongyu.mytools.ui.applet;

import java.applet.Applet;
import java.awt.Button;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class ButtonApplet extends Applet {

	/**序列ID*/
	private static final long serialVersionUID = 1L;

	Button b1 = new Button("Button 1"), b2 = new Button("Button 2");

	public void init() {
		add(b1);
		add(b2);
		b1.addActionListener(new B1Action());
		b2.addActionListener(new B2Action());
	}
	
	private class B1Action implements ActionListener {
		public void actionPerformed(ActionEvent e) {
			getAppletContext().showStatus("Button 1 Click");
		}
	}
	
	private class B2Action implements ActionListener {
		public void actionPerformed(ActionEvent e) {
			getAppletContext().showStatus("Button 2 Click");
		}
	}

}
